leetcode 645
/**
 * Note: The returned array must be malloced, assume caller calls free().
 */
int* findErrorNums(int* nums, int numsSize, int* returnSize)
{
    int *ret=(int*)malloc(sizeof(int)*2);
    int arr[10001]={0};
    for(int i=0;i<numsSize;i++)
    {
        arr[nums[i]]++;
    }
    for(int i=1;i<numsSize+1;i++)
    {
        if(arr[i]==2)
        {
            ret[0]=i;
        }
        if(arr[i]==0)
        {
            ret[1]=i;
        }
    }
    *returnSize=2;
    return ret;
}